package com.zige.zige.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.zige.zige.R;
import com.zige.zige.utils.TxtReaderUtils;

import java.io.InputStream;

/**
 * Created by Fei on 2015/12/17.
 */
public class UserAgreementActivity extends BaseActivity {
    private TextView tv_title,tv_agreement;
    private LinearLayout lay_back;


    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_user_agreement);
        initView();

    }

    private void initView(){
        tv_title  = serchViewById(R.id.title_name);
        tv_title.setText("用户协议");
        lay_back = serchViewById(R.id.lay_back);
        lay_back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                UserAgreementActivity.this.finish();
            }
        });
        tv_agreement = serchViewById(R.id.tv_agreement);
        InputStream inputStream = getResources().openRawResource(R.raw.littlezebraagreement);
        String string = TxtReaderUtils.getString(inputStream);
        tv_agreement.setText(string);
    }
}
